
function twotoone(arr){
    var res=[];
    for(var i=0;i<arr.length;i++){
        res=res.concat(arr[i])
    }
    return res;
}
console.log(twotoone([[1,2,3],[5,6]]))